package com.gxa.ehome.config;
//用于替换配置文件的配置类

import com.gxa.ehome.controller.SysUserController;
import com.gxa.ehome.service2.SysUserService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AppConfig {
//    配置类如果将对象实例化之后,添加到容器中:@Bean
//就是value
    @Bean("sysUserController")
    public SysUserController getController(){
        return new SysUserController();
    }
    @Bean("sysUserService2")
    public SysUserService getService(){
        return new SysUserService();
    }
}
